using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace WABDCUI
{
    public class IntStrComparer : IComparer<string>
    {
        public int Compare(string x, string y)
        {
            if (Regex.IsMatch(x, "\\d+") && Regex.IsMatch(y, "\\d+"))
            {
                return Convert.ToInt32(x).CompareTo(Convert.ToInt32(y));
            }
            else
            {
                return x.CompareTo(y);
            }
        }
    }
}
